package d1225;

import java.io.*;

/*
     BufferedOutputStream类
     缓冲字节输出流
     public BufferedOutputStream(OutputStream os)
     常用的方法：
     1.public void write(int c);把字节写入到输出流
     2.public void write(byte[] bs);把字节写入到输出流中

 */
public class a4 {
    public static void main(String[] args) {
        try (BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream("aaaa.txt"))) {
            bos.write("中国".getBytes());
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
